﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Master/MasterPage_New.master"
    CodeBehind="StatisticsHospitalBySeason.aspx.cs" Inherits="HZ.Supervise.Web.Secondphase.Statistics.StatisticsHospitalBySeason"
    Title="医院季报" %>

<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>
<%@ Register Src="~/Common/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc2" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript">
        function displayDIV() {
            if (document.getElementById("tabcontent2").style.display == "none") {
                document.getElementById("tabcontent2").style.display = "block"
                document.getElementById("btnDis").value = "隐藏图表"
            }
            else {
                document.getElementById("tabcontent2").style.display = "none"
                document.getElementById("btnDis").value = "显示图表"
            }

        }

        function dis(id) {
            document.getElementById("chart1").style.display = "none";
            document.getElementById("chart2").style.display = "none";
            document.getElementById("gridview1").style.display = "none";
            document.getElementById("gridview2").style.display = "none";
            document.getElementById("excelSpan1").style.display = "none";
            document.getElementById("excelSpan2").style.display = "none";
            document.getElementById(id).style.display = "block";

            if (id == "chart1") {
                document.getElementById("gridview1").style.display = "block";
                document.getElementById("excelSpan1").style.display = "block";
            } else {
            document.getElementById("gridview2").style.display = "block";
            document.getElementById("excelSpan2").style.display = "block";
            }
        }

    </script>

    <div id="tabnav">
        <ul>
            <li class="active"><a href="#">医院季报</a></li>
            <li style='<%=HZ.Supervise.Web.Function.CheckMenuByUserID("医院月报")%>'><a href="StatisticsHospitalByYear.aspx?Y=<%=Hid %>">
                医院月报</a></li>
        </ul>
    </div>
    <div>
        <table class="querylist">
            <tr>
                <td align="left">
                    <input id="btnDis" type="button" value="隐藏图表" class="btn" onclick="displayDIV()" />
                </td>
                <td></td>
                <td></td>
                <td  align="right">
                    年：
                </td>
                <td align="right" style="width:101px;">
                    <asp:DropDownList ID="droYear" runat="server" Width="101px" Height="20px">
                        <asp:ListItem>2010</asp:ListItem>
                        <asp:ListItem>2011</asp:ListItem>
                        <asp:ListItem>2012</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td align="right" style="width:88px;">
                    季度：
                </td>
                <td align="left">
                    <asp:DropDownList ID="droSeason" runat="server" Width="88px" Height="20px">
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem Value="4"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Button ID="Button1" runat="server" Text="查  询" CssClass="btn" OnClick="Button1_Click" />
                </td>
            </tr>
           <%-- <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                    
                </td>
                <td>                 
                    
                </td>
                <div id="divTable" runat="server">
                <td>
                    <a href="javascript:dis('chart1')" style="font-size:large">金额图表</a>
                </td>
                <td>
                    
                </td>
                <td align="left">
                    <a href="javascript:dis('chart2')" style="font-size:large">药品图表</a>
                </td>
                <td>
                
                </td>
                </div>
            </tr>--%>
        </table>
    </div>
    <div id="tabcontent2" class="importlist">
    <div id="divTable" runat="server" style="text-align: center;">
    <a href="javascript:dis('chart1')" style="font-size:large">金额图表</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:dis('chart2')" style="font-size:large">药品图表</a>
    </div>
        <asp:Label ID="lblnull" runat="server" Text="无数据" Visible="false"></asp:Label>
        <div id="chart1">
            <asp:Chart ID="ChartPurchasing" runat="server" BackColor="#D3DFF0" BackGradientStyle="TopBottom"
                BorderWidth="2" BorderColor="26, 59, 105" Width="1100px" Height="370">
                <Legends>
                    <asp:Legend BackColor="Transparent" IsTextAutoFit="true" Name="Default" BackGradientStyle="None"
                        Docking="Right" Alignment="Near">
                    </asp:Legend>
                </Legends>
                <BorderSkin SkinStyle="Emboss"></BorderSkin>
                <ChartAreas>
                    <asp:ChartArea Name="ChartHosPurchasing" BorderColor="64, 64, 64, 64" BackSecondaryColor="Transparent"
                        BackColor="64, 165, 191, 228" ShadowColor="Transparent">
                        <Position Y="3" Height="92" Width="79" X="2"></Position>
                        <AxisY LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
                            <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
                            <MajorGrid LineColor="64, 64, 64, 64" />
                        </AxisY>
                        <AxisX LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
                            <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
                            <MajorGrid LineColor="64, 64, 64, 64" />
                        </AxisX>
                    </asp:ChartArea>
                </ChartAreas>
            </asp:Chart>
        </div>
        <div id="chart2" style="display: none;">
            <asp:Chart ID="ChartInStorage" runat="server" BackColor="#D3DFF0" BackGradientStyle="TopBottom"
                BorderWidth="2" BorderColor="26, 59, 105" Width="1100px" Height="370">
                <Legends>
                    <asp:Legend BackColor="Transparent" IsTextAutoFit="true" Name="Default" BackGradientStyle="None"
                        Docking="Right" Alignment="Near">
                    </asp:Legend>
                </Legends>
                <BorderSkin SkinStyle="Emboss"></BorderSkin>
                <ChartAreas>
                    <asp:ChartArea Name="ChartInStorage" BorderColor="64, 64, 64, 64" BackSecondaryColor="Transparent"
                        BackColor="64, 165, 191, 228" ShadowColor="Transparent">
                        <Position Y="3" Height="92" Width="79" X="2"></Position>
                        <AxisY LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
                            <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
                            <MajorGrid LineColor="64, 64, 64, 64" />
                        </AxisY>
                        <AxisX LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
                            <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
                            <MajorGrid LineColor="64, 64, 64, 64" />
                        </AxisX>
                    </asp:ChartArea>
                </ChartAreas>
            </asp:Chart>
        </div>
    </div>
    <div id="gridview1">
        <asp:GridView ID="gvwStatisticsHos" runat="server" AutoGenerateColumns="False"  
            CssClass="mainlist" onrowcreated="gvwStatisticsHos_RowCreated">
            <Columns>
                <asp:BoundField DataField="daytime" HeaderText="日期" ReadOnly="true" />
                <%--<asp:BoundField DataField="addDataColumn" HeaderText="采购类型" />--%>
                <asp:BoundField DataField="PurchaseAmountTotal" HeaderText="采购总金额" ReadOnly="True" />
                <asp:BoundField DataField="DistributeAmountTotal" HeaderText="配送总金额" />
                <asp:BoundField DataField="AddDistributeRate" HeaderText="配送率" />
                <asp:BoundField DataField="WareHouseAmountTotal" HeaderText="入库总金额" ReadOnly="True" />
                <asp:BoundField DataField="addDataColumnRate" HeaderText="入库率" ReadOnly="True" />
            </Columns>
        </asp:GridView>
    </div>
    <div id="gridview2" style="display: none">
        <asp:GridView ID="gvwStatisticsHos1" runat="server" 
            AutoGenerateColumns="False"   CssClass="mainlist" 
            onrowcreated="gvwStatisticsHos1_RowCreated">
            <Columns>
                <asp:BoundField DataField="SortSource" HeaderText="采购类型" />
                <asp:BoundField DataField="PurchaseAmountTotal" HeaderText="采购总金额" ReadOnly="True" />
                <asp:BoundField DataField="DistributeAmountTotal" HeaderText="配送总金额" />
                <asp:BoundField DataField="AddDistributeRate" HeaderText="配送率" />
                <asp:BoundField DataField="WareHouseAmountTotal" HeaderText="入库总金额" ReadOnly="True" />
                <asp:BoundField DataField="AddWareHouseRate" HeaderText="入库率" ReadOnly="True" />
            </Columns>
        </asp:GridView>
    </div>
    <div>
        <span style="text-align: left" id="excelSpan1">
            <hz:HzButton ID="btnExcel1" runat="server" CssClass="btn" Text="导出数据" OnClick="btnExcel1_Click" />
        </span>
        <span style="text-align: left; display:none" id="excelSpan2">
            <hz:HzButton ID="btnExcel2" runat="server" CssClass="btn" Text="导出数据" OnClick="btnExcel2_Click"/>
        </span>
    </div>
    &nbsp;
    <div id="divshow" runat="server" class="listip">
        <ul>
            <li>统计：<asp:Label ID="lblCount" runat="server"></asp:Label></li>
            <li>说明:1.<span>此数据是静态数据，每24小时统计一次。</span> </li>
            <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.<span>配送率计算方式为：配送金额/采购金额；入库率计算方式为：入库金额/采购金额。</span>
            </li>
        </ul>
    </div>
</asp:Content>
